/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.pig4cloud.pigx.shop.user.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pig4cloud.pigx.common.core.util.R;
import com.pig4cloud.pigx.shop.user.api.dto.ShopUserDTO;
import com.pig4cloud.pigx.shop.user.api.entity.ShopUser;
import com.pig4cloud.pigx.shop.user.api.entity.ShopUserInfo;
import com.pig4cloud.pigx.shop.user.api.vo.ShopUserExcelVO;
import com.pig4cloud.pigx.shop.user.api.vo.ShopUserNickNameExcelVO;
import com.pig4cloud.pigx.shop.user.api.vo.ShopUserSalesExcelVO;
import com.pig4cloud.pigx.shop.user.api.vo.ShopUserVO;
import org.springframework.validation.BindingResult;

import java.util.List;

/**
 * 商城用户
 *
 * @author pigx code generator
 * @date 2023-11-30 19:47:26
 */
public interface ShopUserService extends IService<ShopUser> {

	/**
	 * 用户注册
	 * @param shopUserDTO
	 * @return
	 */
	String register(ShopUserDTO shopUserDTO);

	/**
	 * 获取用户详情
	 * @param id
	 * @return
	 */
	ShopUserVO getShopUserInfoByC(Long id);

	/**
	 * 分页获取用户信息
	 * @param shopUserDTO
	 * @return
	 */
	IPage<ShopUserVO> getPage(Page page, ShopUserDTO shopUserDTO);

	/**
	 * 获取用户信息
	 * @param id
	 * @return
	 */
	ShopUserVO getShopUserInfo(Long id);

	/**
	 * 导入销售代表
	 * @param excelVOList
	 * @param bindingResult
	 * @return
	 */
	R importUserSales(List<ShopUserSalesExcelVO> excelVOList, BindingResult bindingResult);

	/**
	 * 导入用户
	 * @param excelVOList
	 * @param bindingResult
	 * @return
	 */
	R importUser(List<ShopUserExcelVO> excelVOList, BindingResult bindingResult);

	/**
	 * 修改用户昵称
	 * @param shopUser
	 * @return
	 */
	R updateUserNickName(ShopUser shopUser);

	/**
	 * 修改用户头像
	 * @param shopUser
	 * @return
	 */
	R updateUserAvatar(ShopUser shopUser);

	/**
	 * 根据销售id获取用户列表
	 * @param page
	 * @param shopUserDTO
	 * @return
	 */
	IPage<ShopUserVO> getUserPageListBySaleUserId(Page page, ShopUserDTO shopUserDTO);

	/**
	 * 微信jsapi授权
	 * @param shopUserDTO
	 * @return
	 */
	R getWeChatSignature(ShopUserDTO shopUserDTO);

}
